unit QSocketProcess;

interface

Uses
  Classes, sysUtils,
  QSocketServer, IdTCPServer, IdException, QPeerThread, PacketData;

Type
  TQSocketProcess = Class(TCustomQSocketProcess)
    private

    protected
      Procedure TCPExecute(AThread: TIdPeerThread); override;
    public
  End;

  TQSocketProcessClass = class of TQSocketProcess;

implementation



{ TQSocketProcess }



procedure TQSocketProcess.TCPExecute(AThread: TIdPeerThread);
//var
//  PacketRead, PacketWrite: TPacketData;
//  Buff:String;
//  RStream: TMemoryStream;
//  cmd:integer;
//  Data: pointer;
//  Size:int64;
begin
//  PacketRead  := TQPeerThread(AThread).PacketRead;
//  PacketWrite := TQPeerThread(AThread).PacketWrite;
//  RStream     := TQPeerThread(AThread).Stream;
//
//  try
//    Buff := AThread.Connection.ReadLn();
//    Buff := Trim(Buff);
//    if SameText(Buff, 'command') then
//    begin
//      RStream.Clear;
//      Athread.Connection.ReadStream(RStream);
//
//      try
//        PacketRead.Get(rStream, Data, Size, cmd);
//        case cmd of
//          1: TEST( TQPeerThread(AThread) );
//        end;
//
//      finally
//        if Size > 0  then FreeMem(Data);
//      end;
//    end;
//
//  Except
//    on e: EIdReadTimeout do Begin
//      Raise;
//    End;
//    On e: EIdSocketError Do Begin
//      Raise;
//    End;
//    On e: EIdReadTimeout Do Begin
//      Raise;
//    End;
//    On e: exception Do Begin
//      Raise;
//    End;
//  End;
end;


end.
